package org.zju.demo.mina;

/**
 * Created by ZJDX on 2015/9/17.
 */
public abstract class AbstractHandler {
    protected byte[] buffer;
    public abstract String handle();
    protected int getId(){
        return buffer[2];
    }
    protected int getCommandType() {
        return buffer[3];
    }
    protected int getData() {
        return buffer[4];
    }
    public AbstractHandler(byte[] buffer) {
        this.buffer = buffer;
    }
}
